/*
 * Copyright (c) 2016. For Intelligent Group.
 */

package com.intelligent.mts.client.core.view;

import com.intelligent.mts.client.utils.GBC;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;
import javax.swing.*;
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

/**
 * Created by Peter on 2016/7/21.
 */
@Component
public class MainPanel extends JPanel {

    @Autowired
    private MainSearchPanel mainSearchPanel;

    @Autowired
    private MainAttrPanel mainAttrPanel;

    @Autowired
    private MainHistoryPanel mainHistoryPanel;
    @Autowired
    private MainStatusPanel mainStatusPanel;

    @PostConstruct
    private void initComponents() {
        this.setLayout(new GridBagLayout());
        this.setPreferredSize(new Dimension(1000, 618));

        this.add(mainSearchPanel, new GBC(0,1).setFill(GBC.BOTH).setWeight(100, 5).setInsets(10,10,10,0));
        this.add(mainAttrPanel, new GBC(0, 2).setFill(GBC.BOTH).setWeight(100, 5));
        this.add(mainHistoryPanel, new GBC(0, 3).setFill(GBC.BOTH).setWeight(100, 100));

//        JSplitPane jSplitPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT,false,mainAttrPanel,mainHistoryPanel);
//        this.add(jSplitPane, new GBC(0, 2).setFill(GBC.BOTH).setWeight(100, 100));
//        mainStatusPanel.setMinimumSize(new Dimension(0, 28));
//        this.add(mainStatusPanel, new GBC(0, 4).setFill(GBC.BOTH).setWeight(100, 0));


    }
}
